--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 09d8f64c9c76deb760ecd7340f319d196910e79f
Parents : 6c42989
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-02-23T19:53:01-06:00
Add ESLint disable comments for regex patterns in MarkdownRenderer.js to address security concerns
Changes
Diff
diff --git a/meshchatx/src/frontend/js/MarkdownRenderer.js b/meshchatx/src/frontend/js/MarkdownRenderer.js
index 0b37e573..2d873887 100644
--- a/meshchatx/src/frontend/js/MarkdownRenderer.js
+++ b/meshchatx/src/frontend/js/MarkdownRenderer.js
@@ -18,6 +18,7 @@ export default class MarkdownRenderer {
// Fenced code blocks - process these FIRST and replace with placeholders
const code_blocks = [];
+ // eslint-disable-next-line security/detect-unsafe-regex -- bounded fenced block, lazy match
text = text.replace(/```(\w+)?\n([\s\S]*?)\n```/g, (match, lang, code) => {
const placeholder = `[[CB${code_blocks.length}]]`;
code_blocks.push(
@@ -91,6 +92,7 @@ export default class MarkdownRenderer {
}
// Strip fenced code blocks
+ // eslint-disable-next-line security/detect-unsafe-regex -- bounded fenced block, lazy match
text = text.replace(/```(\w+)?\n([\s\S]*?)\n```/g, "[Code Block]");
// Strip headers
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────